package main

import (
	"database/sql"
	_ "github.com/mattn/go-sqlite3"
	log "github.com/sirupsen/logrus"
)

func main() {
	// 创建一个新的SQLite数据库文件
	db, err := sql.Open("sqlite3", "D:/shunfeng_interface/shunfeng.db")
	if err != nil {
		log.Fatal(err)
	}

	rows, err := db.Query("SELECT * FROM task;")

	for rows.Next() {
		var id int
		var transitDepoNo string
		var taskNo string
		var crateNo string
		rows.Scan(&id, &transitDepoNo, &taskNo, &crateNo)
		log.Info("id:", id, ",transitDepoNo:", transitDepoNo, taskNo, crateNo)
	}
	defer db.Close()
	log.Info("success")

}
